package com.example.demo.tests;

import com.example.demo.common.Utils;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Actions;

import java.time.Duration;

public class MessageSayPage extends Utils {

    public static String url = "http://82.157.143.27:8081/sign-in.html";

    public MessageSayPage() {
        super(url);
    }

    public void send() throws InterruptedException {


        driver.findElement(By.cssSelector("#artical-items-body > div:nth-child(3) > div > div.col > div.text-truncate > a > strong")).click();

        driver.findElement(By.cssSelector("#btn_details_send_message")).click();


        WebElement element = driver.findElement(By.cssSelector("#index_message_receive_content"));
        Actions actions = new Actions(driver);
        actions.doubleClick(element).perform();
        actions.moveToElement(element).sendKeys("测试1").perform();

        driver.findElement(By.cssSelector("#btn_index_send_message > svg > path:nth-child(3)")).click();



    }
}
